import { Component, OnInit, Input, ViewChild, EventEmitter, Output } from '@angular/core';
import { SFSchema, SFComponent } from '@delon/form';
import { HttpService } from 'lbf';
import { NzMessageService } from 'ng-zorro-antd';

@Component({
  selector: 'lb-zsk',
  templateUrl: './lb_zsk.component.html',
  styleUrls:['./lb_zsk.component.less']
})
export class LbZskComponent implements OnInit {
  @Input() nzVisible = false;
  @ViewChild('addForm',{static:false}) addForm: SFComponent;
  @Output() HandleOk =new EventEmitter();
  @Output() HandleCancel =new EventEmitter();

  dataZsk:any = {}
  dataDAD017 = 0;

  ngOnInit() {
    
     

  }

  onHandleCancel(){
    this.HandleCancel.emit();
  }

  onHandleOk(){
    this.HandleOk.emit();
  }

  InitData(value:number){
    this.dataDAD017 = value;
    this.lbs.lbservice('ZSK_DATA', { DAD017:value }).then(resdata => {
        if (resdata.code >= 1) {
          this.dataZsk = resdata.message.list[0];
          
        } else {

        }
      });
  }

  
  constructor(private lbs:HttpService ,public msgSrv: NzMessageService ) { }
}
